The journey from a struct to an Abstract Data Type (ADT) is a fundamental shift in design philosophy. While a struct is often a passive collection of variables, an ADT is an active entity that manages its own state through Encapsulation.
1. The Design Intent
In C++, the class keyword signals a commitment to Data Abstraction. This strategy separates the interface (what the user can do) from the implementation (how the data is stored). By shielding internal variables, the programmer ensures the object maintains its own internal consistency.
2. Technical Nuance
Technically, the only difference between a struct and a class in C++ is the default access level. Members of a struct are public by default, reflecting their role as open data holders. Members of a class are private by default, reflecting their role as managed entities.
$$\text{ADT} = \text{Data} + \text{Operations}$$